package cn.mingfancloud.基础知识.循环语句;

public class AdditiveFor2 {

    public static void main(String[] args) {
        int sum = 0;
        for (int i = 1; i <= 100; i++) // 在for循环中定义循环变量i
            sum += i;
        System.out.println("the result :" + sum);
    }
}
